function showGeoLocationOnMap(position) {
    
	var map, geocoder, latlng, _marker, _image, address;
	
	geocoder = new google.maps.Geocoder();
	latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
	
	_image = 'cluster.png';
	var myOptions = {
		zoom: 15,
		center: latlng,
		disableDefaultUI: true,
		draggable: false,
		mapTypeId: google.maps.MapTypeId.ROADMAP
	};
	
    map = new google.maps.Map(document.getElementById('positionMap'), myOptions);
	
	_marker = new google.maps.Marker({
		map:map,
		icon: _image,
		draggable: false,
		animation: google.maps.Animation.DROP,
		position: latlng
	});
	
	geocoder.geocode({'latLng': latlng}, function(results, status) {
		if (status == google.maps.GeocoderStatus.OK) {
			if (results[1]) {

				address = '<strong>' + chrome.i18n.getMessage('currentLocationNote') + '</strong><br />';
				
				address = address + results[0].address_components[1].long_name + ' ' + results[0].address_components[0].long_name;
				address = address + '<br />';
				address = address + results[0].address_components[7].long_name + ' ' + results[0].address_components[2].long_name;
				address = address + '<br />';
				address = address + results[0].address_components[6].long_name;
				
				
				document.getElementById('position').innerHTML = address;
				
			} else {
				document.getElementById('position').innerHTML = chrome.i18n.getMessage('errorNoAddressFound');
			}
		} else {
			document.getElementById('position').innerHTML = 'Geocoding failed due to:<br />' + status;
		}
	});
	
};

function onError(error) {
    alert('code: '    + error.code    + '\n' +
          'message: ' + error.message + '\n');
}

function init() {

    navigator.geolocation.getCurrentPosition(showGeoLocationOnMap, onError);
	
}